package homework.day01;

import java.util.Scanner;

public class Test02 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int length;
        String name;
        do {
            System.out.print("请输入用户名:");
            name =scan.nextLine().trim();//去除空白
            length = name.length();
        }while (length<1 || length>20);
        System.out.println("合理用户名"+name);

    }
}
